package com.ff.xyh.common.qo.post;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @Auther FF
 * @Date 2022年 10月 27日
 * @Time 02:07
 */

@Data
@Accessors(chain = true)
public class PostTravelQuery {

    @ApiModelProperty(value = "当前页")
    private long currentPage;
    @ApiModelProperty(value = "页面大小")
    private long pageSize;

    @ApiModelProperty(value = "帖子id")
    private String id;

    @ApiModelProperty(value = "发布人id 查询指定用户发布的帖子 如进用户详情页调用")
    private String userId;
    @ApiModelProperty(value = "包含内容")
    private String contains;
    @ApiModelProperty(value = "指定平台")
    private Integer platformId;

    @ApiModelProperty(value = "最高消费")
    private Integer maxConsumePrice;
    @ApiModelProperty(value = "最低消费")
    private Integer minConsumePrice;
    @ApiModelProperty(value = "最多多少人")
    private Integer totalMax;
    @ApiModelProperty(value = "至少多少人")
    private Integer totalMin;
    @ApiModelProperty(value = "最早出发时间")
    private Date EarliestTime;
    @ApiModelProperty(value = "最晚出发时间")
    private Date LatestTime;

    @ApiModelProperty(value = "创建日期在此之后")
    private Date gmtCreatedAfter;

    @ApiModelProperty(value = "创建日期在此之前")
    private Date gmtCreatedBefore;

    @ApiModelProperty(value = "帖子状态")
    private Integer postStatus;
    @ApiModelProperty(value = "帖子审核状态")
    private Integer checkStatus;


    @ApiModelProperty(value = "按修改时间 true:倒序DESC")
    private Boolean orderByModifiedTime;
    @ApiModelProperty(value = "按创建时间时间 true:倒序DESC")
    private Boolean orderByCreatedTime;


//    public void changeCurrentPageAndSizeToLimitIndex (PostTravelQuery postTravelQuery) {
//        long currentPage = postTravelQuery.currentPage;
//        long size = postTravelQuery.pageSize;
//        if(postTravelQuery.currentPage != 0){
//            postTravelQuery.setCurrentPage( (currentPage-1) * size );
//            postTravelQuery.setPageSize( currentPage * size );
//        }
//    }

}
